home *** CD-ROM | disk | FTP | other *** search
/ ETO Development Tools 1 / ETO Development Tools 1.iso / Essentials / MacApp Documentation / MacApp AppleLink Messages / MacApp.Tech$ 5⁄4⁄90 / 1236-Are you still intere-May90 < prev    next >
Encoding:
Text File  |  1990-05-04  |  2.9 KB  |  62 lines  |  [TEXT/GEOL]

  1. Item    2266620                         2-May-90        15:34PDT
  2.  
  3. From:   STRONG.S                        Strong, Steve
  4.  
  5. To:     D0314                           Imageering Optical Disk Sys,PRT
  6.  
  7. cc:     MACAPP.TECH$                    MacApp Technical
  8.  
  9. Sub:    Are you still interested?
  10.  
  11. Reece:
  12.  
  13. Wow, I took way too long to answer your link!  I have all kinds of plausible
  14. excuses, but you wouldn't believe any of them.  Here is the original link:
  15.  
  16. (************************************************************************)
  17. Thanks for the information!  I called ShowReverted because that is how the
  18. DemoText example that came with 2.0ß9 does it.  An open is all I need.  I had
  19. figured out that I needed to open the window, not my view, but I did it by
  20. having a 'fMyWindow: TWindow' field in my document as well as an fMyView field.
  21. Is there any reason to keep the window field around? i.e.  Will most of the
  22. messages I instigate go to my view or to it's window?  Also shouldn't your
  23. example do a 'FailNIL(aTEView)' after the FindSubView?
  24.  
  25. I am still not sure why a call to any of 'TView.DrawContents'
  26. 'TView.ForceRedraw', 'TView.Show', or 'TView.ViewEnable' would not work,
  27. espcially TView.Show, but they don't.  Oh well on to Cohandlers!!
  28. (************************************************************************)
  29.  
  30. Just in case you are still interested in this stuff, here goes:
  31.  
  32. In general, there is no reason to keep the fMyWindow field around.  Most (if
  33. not exactly all) of the communication is done between the document and the
  34. view.  I don't remember the original problem, but MacApp usually takes care of
  35. openning your windows after calling the DoMakeViews method of your document.
  36. You needed to call the Open method of your window because you created it
  37. outside of the usual process of openning a document first.
  38.  
  39. Concerning the use of FailNIL(), this routine checks to make sure that there
  40. was memory available for the creation of a new object (in other words, it
  41. checks, among other things, to see if NEW returned NIL).  However, FindSubView
  42. does not create a new object, it just returns a reference to an object that
  43. already exists (a subview, in this case, with the appropriate identifier).  So,
  44. you don't need to use FailNIL on a reference returned from FindSubView.
  45.  
  46. Finally, concerning all those other routines (DrawContents, Show, etc) you
  47. generally don't call any of these yourself (except ForceReDraw, which you
  48. frequently use).  Instead, you provide a draw method and allow MacApp to make
  49. sure it is called at the appropriate times.  A real answer to this question
  50. would take more time/space than AppleLink allows.  If you are still confused
  51. (and I think I would be!) you might try reading some of the books written about
  52. MacApp including the most recent one: Programming with MacApp by David Wilson
  53. et al and published by Addison Wesley.  It should be available in bookstores
  54. very soon.
  55.  
  56. Hope this very late response helps.
  57.  
  58. Steve Strong
  59. Developer University
  60.  
  61.  
  62.